// import Uts from "./Uts";
let $state = {
	name: "",
	params: {},
	preName: "",
	preParams: {},
	preState: {},
	state: {},
	setPreName: function(value) {
		this.preName = value;
	},
	getPreName: function() {
		return this.preName;
	},
	setPreParams: function(value) {
		this.preParams = value;
	},
	getPreParams: function() {
		return this.preParams;
	},
	setStateName: function(value) {
		this.setPreName(this.name);
		this.name = value;
	},
	setParams: function(value) {
		this.setPreParams(this.params);
		this.params = value;
	},
	getStateName: function() {
		return this.name;
	},
	getParams: function() {
		return this.params;
	},
	setState: function(value) {
		this.State = value;
	},
	getState: function() {
		return this.State;
	},
	go: function(options) {
		global.Uts.$stateGo(options);
	},
	to: function(path) {
		global.Uts.$stateTo(path);
	}
};

global.$state = $state;

export default $state;
